/*
 * SpriteLoader.h
 *
 *  Created on: 2009/01/29
 *      Author: Yongshik Cho
 */

#ifndef SPRITELOADER_H_
#define SPRITELOADER_H_

#include "../core/Prerequisites.h"
#include "../Sprite.h"
#include <tinyxml.h>


class SpriteLoader
{
public:
	static const std::string _SPRITE_TAG;
	static const std::string _TILE_TAG;
	static const std::string _SOUND_TAG;
	static const std::string _PATH_TAG;
	static const std::string _TEXT_OBJECT_TAG;
	static const std::string _PARTICLE_TAG;

public:
	static Sprite* parse(const String& path);
	static Sprite* parse(TiXmlElement* element);
	static void parseScripts(TiXmlElement* element, Sprite* sprite);

	static Sprite* load(const String& path);
};

//must be declared here
DECLARE_INSTANCE_TYPE(SpriteLoader)

#endif /* SPRITELOADER_H_ */
